﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:Brjnk.GpxExplorer.UI.Controls"
                    xmlns:data="clr-namespace:Brjnk.GpxExplorer.Data"
                    xmlns:l="clr-namespace:Brjnk.GpxExplorer.Localization"
                    xmlns:local="clr-namespace:Brjnk.GpxExplorer;assembly=GpxExplorer"
                    xmlns:my="clr-namespace:Brjnk.GpxExplorer.UI"
                    xmlns:ui="clr-namespace:Brjnk.Common.UI;assembly=Common"
                    xmlns:workspace="clr-namespace:Brjnk.GpxExplorer.Workspace">

    <DataTemplate x:Key="WaypointTemplate" DataType="ws:WaypointVM">
        <StackPanel Orientation="Vertical">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <TextBox Grid.ColumnSpan="2"
                         Style="{StaticResource HeaderTextBoxStyle}"
                         Text="{Binding Source.Name}" />
                <TextBlock Grid.Row="1" Text="{l:LocExtension wptPosition}" />
                <TextBox Grid.Row="1"
                         Grid.Column="1"
                         Text="{Binding Source.Position}" />
                <my:GoToCoordinatesPanel Grid.Row="2"
                                         Grid.ColumnSpan="2"
                                         HorizontalAlignment="Right"
                                         PointObject="{Binding}"
                                         PushpinName="{Binding Source.Name}" />
                <TextBlock Grid.Row="3" Text="{l:LocExtension wptDescription}" />
                <TextBox Grid.Row="3"
                         Grid.Column="1"
                         Text="{Binding Source.Description}" />
                <TextBlock Grid.Row="4" Text="{l:LocExtension wptComment}" />
                <TextBox Grid.Row="4"
                         Grid.Column="1"
                         Text="{Binding Source.Comment}" />
                <TextBlock Grid.Row="5" Text="{l:LocExtension wptElevation}" />
                <TextBox Grid.Row="5"
                         Grid.Column="1"
                         Text="{Binding Source.Elevation,
                                        Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="6" Text="{l:LocExtension wptTime}" />
                <TextBox Grid.Row="6"
                         Grid.Column="1"
                         Text="{Binding Source.Time,
                                        Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="7" Text="{l:LocExtension wptSymbol}" />
                <controls:EnumPicker Grid.Row="7"
                                     Grid.Column="2"
                                     Localize="false"
                                     EnumType="{x:Type data:WaypointSymbol}"
                                     Value="{Binding Source.Symbol,
                                                     Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="8"
                           Grid.ColumnSpan="2"
                           Style="{StaticResource LinkStyle}"
                           Text="{Binding Source.Link.Url}" />
            </Grid>
            <Expander Header="{l:LocExtension wptGeocache}">
                <Expander.Resources>
                    <!--  Styl, který skryje objekt, pokud nejsou dostupná data o Geocaching  -->
                    <Style x:Key="GcInfoStyle" TargetType="FrameworkElement">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Source.Geocache}" Value="{x:Null}">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Expander.Resources>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <ui:WatermarkedTextBox Grid.Row="0"
                                           Grid.ColumnSpan="2"
                                           Style="{StaticResource GcInfoStyle}"
                                           Text="{Binding Source.Geocache.Name}"
                                           ToolTip="{l:Loc wptGcName}"
                                           Watermark="{l:Loc wptGcName}" />
                    <ui:WatermarkedTextBox Grid.Row="1"
                                           Grid.Column="0"
                                           Style="{StaticResource GcInfoStyle}"
                                           Text="{Binding Source.Geocache.Difficulty}"
                                           ToolTip="{l:Loc wptGcDifficulty}"
                                           Watermark="{l:Loc wptGcDifficulty}" />
                    <ui:WatermarkedTextBox Grid.Row="1"
                                           Grid.Column="1"
                                           Style="{StaticResource GcInfoStyle}"
                                           Text="{Binding Source.Geocache.Terrain}"
                                           ToolTip="{l:Loc wptGcTerrain}"
                                           Watermark="{l:Loc wptGcTerrain}" />
                    <controls:EnumPicker Grid.Row="2"
                                         Grid.Column="0"
                                         EnumType="{x:Type data:GeocacheSize}"
                                         Style="{StaticResource GcInfoStyle}"
                                         ToolTip="{l:Loc wptGcSize}"
                                         Value="{Binding Source.Geocache.Size,
                                                         Converter={StaticResource NullableConverter}}" />
                    <controls:EnumPicker Grid.Row="2"
                                         Grid.Column="1"
                                         EnumType="{x:Type data:GeocacheType}"
                                         Style="{StaticResource GcInfoStyle}"
                                         ToolTip="{l:Loc wptGcType}"
                                         Value="{Binding Source.Geocache.Type,
                                                         Converter={StaticResource NullableConverter}}" />
                    <ui:WatermarkedTextBox Grid.Row="3"
                                           Grid.Column="1"
                                           Style="{StaticResource GcInfoStyle}"
                                           Text="{Binding Source.Geocache.Author}"
                                           ToolTip="{l:Loc wptGcAuthor}"
                                           Watermark="{l:Loc wptGcAuthor}" />
                    <ui:WatermarkedTextBox Grid.Row="4"
                                           Grid.ColumnSpan="2"
                                           Height="75"
                                           Style="{StaticResource GcInfoStyle}"
                                           Text="{Binding Source.Geocache.Hint}"
                                           TextWrapping="Wrap"
                                           ToolTip="{l:Loc wptGcHint}"
                                           Watermark="{l:Loc wptGcHint}" />
                    <Button Grid.Row="5"
                            Grid.ColumnSpan="2"
                            Command="{Binding Source={x:Static Member=local:App.Instance},
                                              Path=Workspace.Editor.ViewGeocacheCommand}"
                            CommandParameter="{Binding}"
                            Content="{l:Loc wptGcViewDescription}"
                            Style="{StaticResource GcInfoStyle}" />
                    <Button Grid.Row="6"
                            Grid.ColumnSpan="2"
                            Command="{Binding Source={x:Static Member=local:App.Instance},
                                              Path=Workspace.Editor.OpenGeocacheCommand}"
                            CommandParameter="{Binding}"
                            Content="{l:Loc wptGcOpenGc}"
                            Style="{StaticResource GcInfoStyle}" />
                    <Button Grid.Row="7"
                            Grid.ColumnSpan="2"
                            Command="{Binding Source={x:Static Member=local:App.Instance},
                                              Path=Workspace.Editor.RemoveGeocacheInfo}"
                            CommandParameter="{Binding}"
                            Content="{l:Loc wptGcRemoveGc}"
                            Style="{StaticResource GcInfoStyle}" />
                    <Button Grid.Row="8"
                            Grid.ColumnSpan="2"
                            Command="{Binding Source={x:Static Member=local:App.Instance},
                                              Path=Workspace.Editor.CreateGeocacheInfo}"
                            CommandParameter="{Binding}"
                            Content="{l:LocExtension wptGcCreateGc}">
                        <Button.Style>
                            <Style TargetType="Button">
                                <Setter Property="Visibility" Value="Collapsed" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Source.Geocache}" Value="{x:Null}">
                                        <Setter Property="Visibility" Value="Visible" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Button.Style>
                    </Button>
                </Grid>
            </Expander>
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="RouteTemplate">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <TextBox Grid.ColumnSpan="2"
                     Style="{StaticResource HeaderTextBoxStyle}"
                     Text="{Binding Source.Name}" />
            <TextBlock Grid.Row="1" Text="{l:Loc rteDescription}" />
            <TextBox Grid.Row="1"
                     Grid.Column="1"
                     Text="{Binding Source.Description}" />
            <TextBlock Grid.Row="2" Text="{l:Loc rteComment}" />
            <TextBox Grid.Row="2"
                     Grid.Column="1"
                     Text="{Binding Source.Comment}" />
            <TextBlock Grid.Row="3" Text="{l:Loc rteColor}" />
            <controls:ColorPicker Grid.Row="3"
                                  Grid.Column="1"
                                  Color="{Binding Color}" />
            <TextBlock Grid.Row="4" Text="{l:Loc rteDistance}" />
            <TextBlock Grid.Row="4"
                       Grid.Column="1"
                       Text="{Binding Distance,
                                      Mode=OneWay}" />
            <TextBlock Grid.Row="5"
                       Grid.ColumnSpan="2"
                       Style="{StaticResource LinkStyle}"
                       Text="{Binding Source.Link.Url}" />
            <ListView Grid.Row="6"
                      Grid.ColumnSpan="2"
                      ItemsSource="{Binding Points}"
                      SelectionMode="{Binding Source={workspace:GetWorkspace},
                                              Path=Settings.RoutePointsMultipleSelectionMode,
                                              Converter={StaticResource BoolToMultipleSelectionModeConverter}}">
                <ListView.ContextMenu>
                    <ContextMenu>
                        <MenuItem Command="{Binding Source={workspace:GetWorkspace},
                                                    Path=Editor.RemoveRoutePointsCommand}"
                                  CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu},
                                                             Path=PlacementTarget.SelectedItems}"
                                  Header="{l:Loc trkPointRemoveSelected}" />
                    </ContextMenu>
                </ListView.ContextMenu>
                <ListView.ItemContainerStyle>
                    <Style TargetType="ListViewItem">
                        <Setter Property="IsSelected" Value="{Binding IsSelected}" />
                    </Style>
                </ListView.ItemContainerStyle>
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="{l:Loc rtePointNum}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <controls:HighlightedTextBlock Text="{Binding Number}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn DisplayMemberBinding="{Binding Distance}" Header="{l:Loc rtePointDistance}" />
                        <GridViewColumn DisplayMemberBinding="{Binding DistanceDelta}" Header="{l:Loc rtePointDistanceDelta}" />
                        <GridViewColumn DisplayMemberBinding="{Binding Azimuth, Converter={StaticResource NullableConverter}}" Header="{l:Loc rtePointAzimuth}" />
                        <GridViewColumn DisplayMemberBinding="{Binding Source.Position}" Header="{l:Loc rtePointPosition}" />
                        <GridViewColumn>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <my:GoToCoordinatesPanel ButtonAddPushpin="False" PointObject="{Binding}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="{l:Loc rtePointRemove}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Button Command="{Binding Source={workspace:GetWorkspace}, Path=Editor.RemoveRoutePointsCommand}" CommandParameter="{Binding}">
                                        <Image Width="16"
                                               Height="16"
                                               Source="/Resources/Icons/remove16.png" />
                                    </Button>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="{l:Loc rtePointEdit}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Button Command="{Binding Source={workspace:GetWorkspace}, Path=Editor.EditRoutePointCommand}" CommandParameter="{Binding}">
                                        <Image Width="16"
                                               Height="16"
                                               Source="/Resources/Icons/edit16.png" />
                                    </Button>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="TrackTemplate">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <!--  <RowDefinition Height="Auto" />  -->
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBox Grid.ColumnSpan="2"
                         Style="{StaticResource HeaderTextBoxStyle}"
                         Text="{Binding Source.Name}" />
                <TextBlock Grid.Row="1" Text="{l:Loc trkDescription}" />
                <TextBox Grid.Row="1"
                         Grid.Column="1"
                         Text="{Binding Source.Description}" />
                <TextBlock Grid.Row="2" Text="{l:Loc trkComment}" />
                <TextBox Grid.Row="2"
                         Grid.Column="1"
                         Text="{Binding Source.Comment}" />
                <TextBlock Grid.Row="3" Text="{l:Loc trkColor}" />
                <controls:ColorPicker Grid.Row="3"
                                      Grid.Column="1"
                                      Color="{Binding Color}" />
                <TextBlock Grid.Row="5"
                           Grid.ColumnSpan="2"
                           Style="{StaticResource LinkStyle}"
                           Text="{Binding Source.Link.Url}" />
                <!--  <Button Grid.Row="6" Grid.ColumnSpan="2" Content="{l:Loc trkSimplify}" CommandParameter="{Binding}" Command="{Binding Source={workspace:GetWorkspace}, Path=Editor.SimplifyTrackCommand}" />  -->
            </Grid>
            <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Text="{l:Loc trkDistance}" />
                <TextBlock Grid.Row="1" Text="{l:Loc trkRised}" />
                <TextBlock Grid.Row="2" Text="{l:Loc trkFallen}" />
                <TextBlock Grid.Row="3" Text="{l:Loc trkAvgSpeed}" />
                <TextBlock Grid.Row="4" Text="{l:Loc trkDuration}" />
                <TextBlock Grid.Row="0"
                           Grid.Column="1"
                           Text="{Binding Distance}" />
                <TextBlock Grid.Row="1"
                           Grid.Column="1"
                           Text="{Binding Rised,
                                          Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="2"
                           Grid.Column="1"
                           Text="{Binding Fallen,
                                          Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="3"
                           Grid.Column="1"
                           Text="{Binding AvgSpeed,
                                          Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="4"
                           Grid.Column="1"
                           Text="{Binding Duration,
                                          Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="0"
                           Grid.Column="2"
                           Text="{Binding DistanceJoined}" />
                <TextBlock Grid.Row="1"
                           Grid.Column="2"
                           Text="{Binding RisedJoined,
                                          Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="2"
                           Grid.Column="2"
                           Text="{Binding FallenJoined,
                                          Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="3"
                           Grid.Column="2"
                           Text="{Binding AvgSpeedJoined,
                                          Converter={StaticResource NullableConverter}}" />
                <TextBlock Grid.Row="4"
                           Grid.Column="2"
                           Text="{Binding DurationJoined,
                                          Converter={StaticResource NullableConverter}}" />
            </Grid>
            <ListView Name="trkPointsList"
                      Grid.Row="2"
                      ItemsSource="{Binding FlatPoints}"
                      SelectionMode="{Binding Source={workspace:GetWorkspace},
                                              Path=Settings.TrackPointsMultipleSelectionMode,
                                              Converter={StaticResource BoolToMultipleSelectionModeConverter}}">
                <ListView.ContextMenu>
                    <ContextMenu>
                        <MenuItem Command="{Binding Source={workspace:GetWorkspace},
                                                    Path=Editor.RemoveTrackPointsCommand}"
                                  CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu},
                                                             Path=PlacementTarget.SelectedItems}"
                                  Header="{l:Loc trkPointRemoveSelected}" />
                    </ContextMenu>
                </ListView.ContextMenu>
                <ListView.ItemContainerStyle>
                    <Style TargetType="ListViewItem">
                        <Setter Property="IsSelected" Value="{Binding IsSelected}" />
                    </Style>
                </ListView.ItemContainerStyle>
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="{l:Loc trkPointNumber}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <controls:HighlightedTextBlock Text="{Binding Number}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="{l:Loc trkPointSegmentNumber}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <controls:HighlightedTextBlock Text="{Binding SegmentNumber}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn DisplayMemberBinding="{Binding Time, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointTime}" />
                        <GridViewColumn Header="{l:Loc trkPointElevation}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Elevation, Converter={StaticResource TrackPointElevationConverter}}">
                                        <TextBlock.Style>
                                            <Style TargetType="TextBlock">
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding ElevationLocalExtreme, Converter={StaticResource ToStringContainsConverter}, ConverterParameter=Maximum}" Value="True">
                                                        <Setter Property="FontWeight" Value="Bold" />
                                                    </DataTrigger>
                                                    <DataTrigger Binding="{Binding ElevationLocalExtreme, Converter={StaticResource ToStringContainsConverter}, ConverterParameter=Minimum}" Value="True">
                                                        <Setter Property="FontWeight" Value="Bold" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </TextBlock.Style>
                                    </TextBlock>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn DisplayMemberBinding="{Binding DistanceJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointDistance}" />
                        <GridViewColumn DisplayMemberBinding="{Binding DistanceDeltaJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointDistanceDelta}" />
                        <GridViewColumn DisplayMemberBinding="{Binding DurationJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointDuration}" />
                        <GridViewColumn DisplayMemberBinding="{Binding SpeedJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointSpeed}" />
                        <GridViewColumn DisplayMemberBinding="{Binding AccelerationJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointAcceleration}" />
                        <GridViewColumn DisplayMemberBinding="{Binding VerticalSpeedJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointVerticalSpeed}" />
                        <GridViewColumn DisplayMemberBinding="{Binding RisedJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointRised}" />
                        <GridViewColumn DisplayMemberBinding="{Binding FallenJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointFallen}" />
                        <GridViewColumn DisplayMemberBinding="{Binding SlopeJoined, Converter={StaticResource TrackPointAttributeValueConverter}}" Header="{l:Loc trkPointSlope}" />
                        <GridViewColumn DisplayMemberBinding="{Binding Source.Position}" Header="{l:Loc trkPointPosition}" />
                        <GridViewColumn>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <my:GoToCoordinatesPanel ButtonAddPushpin="False" PointObject="{Binding}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>

                        <GridViewColumn Header="{l:Loc trkPointRemove}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Button MinWidth="0"
                                            Command="{Binding Source={workspace:GetWorkspace},
                                                              Path=Editor.RemoveTrackPointsCommand}"
                                            CommandParameter="{Binding}">
                                        <Image Width="16"
                                               Height="16"
                                               Source="/Resources/Icons/remove16.png" />
                                    </Button>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="{l:Loc trkPointEdit}">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Button MinWidth="0"
                                            Command="{Binding Source={workspace:GetWorkspace},
                                                              Path=Editor.EditTrackPointCommand}"
                                            CommandParameter="{Binding}">
                                        <Image Width="16"
                                               Height="16"
                                               Source="/Resources/Icons/edit16.png" />
                                    </Button>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>

            <!--  Tlačítko pro hromádný výběr bodů stopy  -->
            <UniformGrid Grid.Row="3" Columns="2">
                <Button Command="{Binding DataView.UnselectAllTrackPointsCommand,
                                          Source={workspace:GetWorkspace}}"
                        CommandParameter="{Binding}"
                        Content="{l:Loc trkUnselectAll}" />
                <Button Command="{Binding DataView.SelectElevationExtremeTrackPointsCommand,
                                          Source={workspace:GetWorkspace}}"
                        CommandParameter="{Binding}"
                        Content="{l:Loc trkSelectEleExtremes}" />
            </UniformGrid>
        </Grid>
    </DataTemplate>
</ResourceDictionary>